首页> 外文OA文献 >From Query to Usable Code: An Analysis of Stack Overflow Code Snippets
【2h】

From Query to Usable Code: An Analysis of Stack Overflow Code Snippets

机译:从查询到可用代码:堆栈溢出代码片段的分析

代理获取
本网站仅为用户提供外文OA文献查询和代理获取服务,本网站没有原文。下单后我们将采用程序或人工为您竭诚获取高质量的原文,但由于OA文献来源多样且变更频繁,仍可能出现获取不到、文献不完整或与标题不符等情况,如果获取不到我们将提供退款服务。请知悉。

摘要

Enriched by natural language texts, Stack Overflow code snippets are aninvaluable code-centric knowledge base of small units of source code. Besidesbeing useful for software developers, these annotated snippets can potentiallyserve as the basis for automated tools that provide working code solutions tospecific natural language queries. With the goal of developing automated tools with the Stack Overflow snippetsand surrounding text, this paper investigates the following questions: (1) Howusable are the Stack Overflow code snippets? and (2) When using text searchengines for matching on the natural language questions and answers around thesnippets, what percentage of the top results contain usable code snippets? A total of 3M code snippets are analyzed across four languages: C\#, Java,JavaScript, and Python. Python and JavaScript proved to be the languages forwhich the most code snippets are usable. Conversely, Java and C\# proved to bethe languages with the lowest usability rate. Further qualitative analysis onusable Python snippets shows the characteristics of the answers that solve theoriginal question. Finally, we use Google search to investigate the alignmentof usability and the natural language annotations around code snippets, andexplore how to make snippets in Stack Overflow an adequate base for futureautomatic program generation.
机译:堆栈溢出代码片段丰富了自然语言文本,是以小单元源代码为基础的以代码为中心的宝贵知识库。除了对软件开发人员有用之外,这些带注释的代码片段还可以用作自动工具的基础,这些工具可以为特定的自然语言查询提供工作代码解决方案。为了开发具有Stack Overflow代码片段和周围文本的自动化工具,本文研究了以下问题:(1)Stack Overflow代码片段是否有用? (2)在使用文本搜索引擎匹配代码段周围的自然语言问题和答案时,排名前几的结果中包含可用代码段的百分比是多少?总共使用3种语言分析了3M代码片段:C \#,Java,JavaScript和Python。事实证明,Python和JavaScript是可使用最多代码段的语言。相反,事实证明Java和C#是使用率最低的语言。对可用Python片段的进一步定性分析显示了解决原始问题的答案的特征。最后,我们使用Google搜索来研究可用性和代码片段周围的自然语言注释的对齐方式,并探索如何使Stack Overflow中的片段成为将来自动生成程序的充分基础。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
代理获取

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号